#!/bin/bash
set -e

# Build Docker image
docker build -t nextjs-app:latest .

# Optional: Push to registry
# docker tag nextjs-app:latest your-registry/nextjs-app:latest
# docker push your-registry/nextjs-app:latest

# Install/upgrade Helm chart
helm upgrade --install nextjs-app ./charts/nextjs-app \
  --namespace your-namespace \
  --create-namespace \
  --set image.tag=latest